package com.example.service.impl;


import com.example.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

@Service
@Transactional
public class LoginServiceImpl implements LoginService {


    @Override
    public void login(String telephone) {
        /*//1:判断用户是否是会员,用户不是会员,直接变成
        Member member = memberDao.findmember(telephone);
        //对象怎么判断是否为空值 与null比较
        if(member==null){
            //是会员,直接让用户登录,怎么让用户直接登录,跳转的页面么,返回字符串
            //注册会员
            Member member1=new Member();
            member1.setPhoneNumber(telephone);
            member1.setRegTime(new Date());

            memberDao.addmember(member1);

//            return new Result(true, MessageConstant.LOGIN_SUCCESS);*/
//        }

    }
}
